package com.test.enums;

import lombok.Data;
import lombok.ToString;

/**
 * 枚举类
 * 反应用户状态的
 */

public enum ReplayCode {
    //成功状态码
    SUCCESS(0,"操作成功"),
    //成功状态码
    err(1,"操作失败"),
    //空值状态码
    NULL(2),
    //Page空值状态码
    Page_NULL(3, "页码不能为空"),
    //出现未知错误（异常）
    UNKNOW_ERROR(-1,"未知错误"),
    //用户不存在
    USER_NOT_FIND(100,"用户不存在"),
    //必填参数为空
    REQUIREDNULL_ERR(101,"必填参数不能为空"),
    //操作失败异常
    DO_ERR(102,"操作失败"),
    //文件上传失败
    UploadPhoto_ERR(103,"文件上传失败"),
    //上传文件为空！
    UploadNULL_ERR(104,"上传文件为空！"),
    //上传文件为空！
    GetOppenid_ERR(105,"获取oppenid失败");

    private int code;
    private String msg;

    ReplayCode(int code) {
        this.code = code;
    }
    ReplayCode(int code, String msg) {
        this.code = code;
        this.msg = msg;
    }

    public int getCode() {
        return code;
    }

    public void setCode(int code) {
        this.code = code;
    }

    public String getMsg() {
        return msg;
    }

    public void setMsg(String msg) {
        this.msg = msg;
    }
}